



import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_example/page/my_login_page.dart';

class MyRouteAuthMiddleware extends GetMiddleware {

  @override
  RouteSettings? redirect(String? route) {
    // 加入 AuthService
    Future.delayed(const Duration(seconds: 1), () => Get.snackbar("提示", "请先登录APP"));

    return const RouteSettings(name: MyLoginPage.route);
  }
}